package com.usian.scheduled;

import com.usian.service.UserService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

public class MyJob implements Job {

    @Autowired
    private UserService userService;

    private final static Logger logger = LoggerFactory.getLogger(MyJob.class);

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

        userService.testCorn();

        //查库存小于5的sku  list --？遍历   update

        logger.info("定时任务执行的内容=="+new Date());
    }
}
